package com.youi.dao;

import java.util.List;
import java.util.Map;

import org.apache.ibatis.annotations.Param;

public interface BaseDao<T> {
	
	public T get(Long id); 
	public void delById(Long id);
	public void delete(T t);
	public void saveOrUpdate(T t);
	public void saveOrUpdateAll(List<T> t);
	public void deleteAll(List<T> t);
	public T getObject(@Param("params")Map<String, Object> params);
	public List<T> getObjectList(@Param("params")Map<String, Object> params);
	public T getByParam(@Param("params")Map<String, Object> params,@Param("searchParams")Map<String, Object> searchParams,@Param("sortParams")Map<String, Object> sortParams);
	public List<T> getByParams(@Param("params")Map<String, Object> params, @Param("searchParams")Map<String, Object> searchParams,@Param("sortParams")Map<String, Object> sortParams);
	public T getByParamss(@Param("params")Map<String, Object> params, @Param("searchParams")Map<String, Object> searchParams,@Param("sortParams")Map<String, Object> sortParams,
			@Param("gtParams")Map<String, Object>  gtParams,@Param("ltParams")Map<String, Object> ltParams);
	public List<T> getByParamsList(@Param("params")Map<String, Object> params, @Param("searchParams")Map<String, Object> searchParams,@Param("sortParams")Map<String, Object> sortParams,
			@Param("pageIndex")Integer pageIndex, @Param("pageNum")Integer pageNum,@Param("gtParams")Map<String, Object>  gtParams,@Param("ltParams")Map<String, Object> ltParams);
	public List<T> getByParamsAll(@Param("params")Map<String, Object> params, @Param("searchParams")Map<String, Object> searchParams,@Param("sortParams")Map<String, Object> sortParams,
			@Param("gtParams")Map<String, Object>  gtParams,@Param("ltParams")Map<String, Object> ltParams);
	public Integer getCount(@Param("params")Map<String, Object> params);
	public Integer getCountByParams(@Param("params")Map<String, Object> params, @Param("searchParams")Map<String, Object> searchParams);
	public Integer getCountByParamss(@Param("params")Map<String, Object> params, @Param("searchParams")Map<String, Object> searchParams,
			@Param("gtParams")Map<String, Object>  gtParams,@Param("ltParams")Map<String, Object> ltParams);
	public List<T> getNullGmtLoginout();
}
